<?php
namespace Home\Model;
use Think\Model;
Class GoodsModel //extends Model
{
    /**
     * 添加单条产品数据
     * @return \Model|Model
     */
    public function add_goods_info($res,$condition = '')
    {
        return M("section_goods")->where($condition)->add($res);
    }

    /**
     * 查询用户产品数据
     * @param $condition
     * @return mixed
     */
    public function get_goods_info($condition = '',$order = "goods_id desc",$limit = '')
    {
        return M("section_goods")->where($condition)->order($order)->limit($limit)->select();
    }

	    /**
     * 查询产品详情数据
     * @param $condition
     * @return mixed
     */
    public function get_goods_one_info($condition = '')
    {
        return M("section_goods")->where($condition)->find();
    }

   /**
     * 删除用户产品数据
     * @param $condition
     * @return mixed
     */
    public function delete_goods_info($condition = '',$param)
    {
        return M("section_goods")->where($condition)->save($param);
    }
	
	/**
     * 添加单条产品图片数据
     * @return \Model|Model
     */
    public function add_goods_picture($res)
    {
        return M("section_picture")->add($res);
    }
	
	/**
     * 添加收藏数据
     * @return \Model|Model
     */
    public function add_college($res)
    {
        return M("section_college")->where($condition)->add($res);
    }
	
	 /**
     * 删除用户产品收藏数据
     * @param $condition
     * @param $param
     * @return mixed
     */
    public function delete_college_info($condition = '',$param)
    {
        return M("section_college")->where($condition)->save($param);
    }
	
	
}






?>